<template>
    <div>
        <el-table :data="auths" style="width: 100%; height: 100%; font-size: 14px">
            <el-table-column label="序号" width="50" type="index" />
            <el-table-column label="绑定账号平台" width="140" align="center" prop="source" show-overflow-tooltip />
            <el-table-column label="头像" width="120" align="center" prop="avatar">
                <template #default="scope">
                    <img :src="scope.row.avatar" style="width: 45px; height: 45px" />
                </template>
            </el-table-column>
            <el-table-column
                label="系统账号"
                width="180"
                align="center"
                prop="userName"
                :show-overflow-tooltip="true"
            />
            <el-table-column label="绑定时间" width="180" align="center" prop="createTime" />
            <el-table-column label="操作" width="80" align="center" class-name="small-padding fixed-width">
                <template #default="scope">
                    <el-button size="small" type="text" @click="unlockAuth(scope.row)">解绑</el-button>
                </template>
            </el-table-column>
        </el-table>

        <div id="git-user-binding">
            <h4 class="provider-desc">你可以绑定以下第三方帐号</h4>
            <div id="authlist" class="user-bind">
                <a class="third-app" href="#" title="使用 微信 账号授权登录" @click="authUrl('wechat')">
                    <div class="git-other-login-icon">
                        <svg width="128" height="110" viewBox="0 0 128 110" xmlns="http://www.w3.org/2000/svg">
                            <path
                                d="M86.635 33.334c1.467 0 2.917.113 4.358.283C87.078 14.392 67.58.111 45.321.111 20.44.111.055 17.987.055 40.687c0 13.104 6.781 23.863 18.115 32.209l-4.527 14.352 15.82-8.364c5.666 1.182 10.207 2.395 15.858 2.395 1.42 0 2.829-.073 4.227-.189-.886-3.19-1.398-6.53-1.398-9.996 0-20.845 16.98-37.76 38.485-37.76zm-24.34-12.936c3.407 0 5.665 2.363 5.665 5.954 0 3.576-2.258 5.97-5.666 5.97-3.392 0-6.795-2.395-6.795-5.97 0-3.591 3.403-5.954 6.795-5.954zM30.616 32.323c-3.393 0-6.818-2.395-6.818-5.971 0-3.591 3.425-5.954 6.818-5.954 3.392 0 5.65 2.363 5.65 5.954 0 3.576-2.258 5.97-5.65 5.97z"
                            />
                            <path
                                d="M127.945 70.52c0-19.075-18.108-34.623-38.448-34.623-21.537 0-38.5 15.548-38.5 34.623 0 19.108 16.963 34.622 38.5 34.622 4.508 0 9.058-1.2 13.584-2.395l12.414 7.167-3.404-11.923c9.087-7.184 15.854-16.712 15.854-27.471zm-50.928-5.97c-2.254 0-4.53-2.362-4.53-4.773 0-2.378 2.276-4.771 4.53-4.771 3.422 0 5.665 2.393 5.665 4.771 0 2.41-2.243 4.773-5.665 4.773zm24.897 0c-2.24 0-4.498-2.362-4.498-4.773 0-2.378 2.258-4.771 4.498-4.771 3.392 0 5.665 2.393 5.665 4.771 0 2.41-2.273 4.773-5.665 4.773z"
                            />
                        </svg>
                    </div>
                    <span class="app-name">WeiXin</span>
                </a>
                <a class="third-app" href="#" title="使用 MaxKey 账号授权登录" @click="authUrl('maxkey')">
                    <div class="git-other-login-icon">
                        <svg
                            xmlns="http://www.w3.org/2000/svg"
                            xmlns:xlink="http://www.w3.org/1999/xlink"
                            width="256"
                            height="256"
                            viewBox="0 0 256 256"
                        >
                            <image
                                id="图层_1"
                                data-name="图层 1"
                                width="256"
                                height="256"
                                xlink:href="data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADOCAYAAABo1g13AAAazklEQVR4nO2dS1NcR5bH/3kLYZl22OXdbCRdVtOoF4Zd9zxCsJudYNc7wScQRFvYO8Fmoo16AvgEwK53QquZHXjh3lJaWHinBH8AlxQdtiyZmxN5MqsooB6Z95V5b+UvQmGZKMGt4pw8jzwPhoA3xPFqPOxZON/h4beVL0EBCoaE+mJyFhBNMBYD4h4Ya0JACnuz548NbfrDhFIIAQ6wMwjB0ZBf+63F+U67np9ovgQFyImuoLMkBtgXAJuXX3b4SFJBWgBrQyTfIkIrKMZNggKkJI6/nEeCWbDoAQRmHQu7DS0wcCTiBRpocf6sVZHnLoSgAIbQCZ9MLGqBn4e92+Ir0n06JivR+HA8bnFGUIAhqFOeLQLsYYVO+GwwcQwhXiD67XAclCEowDV6hP5RjU75tLSA5KDOyhAUQLk3TSSTj8GwqP35wHWkZUhwgMaHwzoF0mOtAHTaC/YUgjI2ATPaADtE9O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h+nm6rAAAAABJRU5ErkJggg=="
                            />
                        </svg>
                    </div>
                    <span class="app-name">MaxKey</span>
                </a>
                <a class="third-app" href="#" title="使用 TopIam 账号授权登录" @click="authUrl('topiam')">
                    <div class="git-other-login-icon">
                        <svg
                            width="200"
                            height="200"
                            viewBox="0 0 200 200"
                            fill="none"
                            xmlns="http://www.w3.org/2000/svg"
                        >
                            <g clip-path="url(#clip0_446_540)">
                                <path
                                    d="M113.069 160.072C103.717 170.743 93.0453 180.216 81.5345 188.609C61.5105 174.46 44.3642 156.595 30.9349 135.971C23.5009 124.46 17.2659 112.11 12.4697 99.0407C9.592 91.3668 7.19392 83.3332 5.27545 75.2996C2.03803 61.3907 0.359375 47.0022 0.359375 32.1341C0.359375 30.6953 0.359375 29.1365 0.359375 27.6977C6.35459 23.9806 12.7095 20.7432 19.0644 17.7456C20.7431 32.1341 24.1004 46.043 28.8966 59.3524C31.6544 66.9063 34.7719 74.3404 38.4889 81.4147C44.604 93.5251 52.0381 104.796 60.4314 115.228C75.1796 133.093 92.9254 148.321 113.069 160.072Z"
                                    fill="url(#paint0_linear_446_540)"
                                />
                                <path
                                    d="M196.643 67.6256C195.084 76.3786 192.926 84.8918 190.168 93.1652C178.897 91.1269 167.266 90.0477 155.276 90.0477C154.197 90.0477 153.118 90.0477 152.039 90.0477C126.859 90.4074 102.878 95.6832 80.9352 105.036C72.302 94.8439 64.868 83.453 58.9927 71.3427C81.6546 61.8702 106.475 56.7144 132.614 56.7144C141.487 56.7144 150.24 57.3139 158.753 58.5129C171.823 60.1916 184.533 63.3091 196.643 67.6256Z"
                                    fill="url(#paint1_linear_446_540)"
                                />
                                <path
                                    d="M199.64 34.0528C199.64 39.2087 199.401 44.3646 199.041 49.4005C186.691 44.1247 173.621 40.048 160.072 37.53C148.321 35.2518 136.211 34.0528 123.981 34.0528C97.7218 34.0528 72.6619 39.3286 49.88 48.9209C42.6858 51.9185 35.7313 55.3958 29.0167 59.2327C24.2205 46.0432 20.8632 32.0144 19.1846 17.6259C26.6186 14.1487 34.2925 11.271 42.2062 8.75301C60.3117 3.11751 79.4964 0 99.4005 0C119.904 0 139.568 3.23741 158.153 9.11272C172.782 13.789 186.691 20.2638 199.52 28.1775C199.64 30.2159 199.64 32.1343 199.64 34.0528Z"
                                    fill="url(#paint2_linear_446_540)"
                                />
                                <path
                                    d="M190.168 93.2855C182.494 116.547 170.384 137.65 154.796 155.875C149.76 161.751 144.364 167.386 138.609 172.542C126.858 183.214 113.789 192.446 99.7601 200C93.4052 196.523 87.41 192.686 81.5347 188.609C93.0455 180.336 103.717 170.744 113.069 160.072C117.866 154.676 122.302 148.921 126.499 143.046C137.65 127.098 146.403 109.233 152.158 90.1679C153.237 90.1679 154.316 90.1679 155.396 90.1679C167.146 90.048 178.777 91.1272 190.168 93.2855Z"
                                    fill="url(#paint3_linear_446_540)"
                                />
                            </g>
                            <defs>
                                <linearGradient
                                    id="paint0_linear_446_540"
                                    x1="15.8569"
                                    y1="27.5782"
                                    x2="86.4712"
                                    y2="182.06"
                                    gradientUnits="userSpaceOnUse"
                                >
                                    <stop stop-color="#57A4F7" />
                                    <stop offset="1" stop-color="#2158F9" />
                                </linearGradient>
                                <linearGradient
                                    id="paint1_linear_446_540"
                                    x1="58.9501"
                                    y1="80.8427"
                                    x2="196.648"
                                    y2="80.8427"
                                    gradientUnits="userSpaceOnUse"
                                >
                                    <stop stop-color="#2158F9" />
                                    <stop offset="1" stop-color="#33E1E5" />
                                </linearGradient>
                                <linearGradient
                                    id="paint2_linear_446_540"
                                    x1="19.1564"
                                    y1="29.6353"
                                    x2="199.647"
                                    y2="29.6353"
                                    gradientUnits="userSpaceOnUse"
                                >
                                    <stop stop-color="#255DF9" />
                                    <stop offset="1" stop-color="#7C35BA" />
                                </linearGradient>
                                <linearGradient
                                    id="paint3_linear_446_540"
                                    x1="95.3808"
                                    y1="192.567"
                                    x2="174.674"
                                    y2="97.4815"
                                    gradientUnits="userSpaceOnUse"
                                >
                                    <stop stop-color="#54A0F7" />
                                    <stop offset="1" stop-color="#2158F9" />
                                </linearGradient>
                                <clipPath id="clip0_446_540">
                                    <rect width="200" height="200" fill="white" />
                                </clipPath>
                            </defs>
                        </svg>
                    </div>
                    <span class="app-name">TopIam</span>
                </a>
                <a class="third-app" href="#" title="使用 Gitee 账号授权登录" @click="authUrl('gitee')">
                    <div class="git-other-login-icon">
                        <svg
                            t="1686919908144"
                            class="icon"
                            viewBox="0 0 1024 1024"
                            version="1.1"
                            xmlns="http://www.w3.org/2000/svg"
                            p-id="2521"
                            width="200"
                            height="200"
                            xmlns:xlink="http://www.w3.org/1999/xlink"
                        >
                            <path
                                d="M512 992C246.895625 992 32 777.104375 32 512S246.895625 32 512 32s480 214.895625 480 480-214.895625 480-480 480z m242.9521875-533.3278125h-272.56875a23.7121875 23.7121875 0 0 0-23.71125 23.7121875l-0.024375 59.255625c0 13.08 10.6078125 23.7121875 23.6878125 23.7121875h165.96c13.104375 0 23.7121875 10.6078125 23.7121875 23.6878125v11.855625a71.1121875 71.1121875 0 0 1-71.1121875 71.1121875h-225.215625a23.7121875 23.7121875 0 0 1-23.6878125-23.7121875V423.1278125a71.1121875 71.1121875 0 0 1 71.0878125-71.1121875h331.824375a23.7121875 23.7121875 0 0 0 23.6878125-23.71125l0.0721875-59.2565625a23.7121875 23.7121875 0 0 0-23.68875-23.7121875H423.08a177.76875 177.76875 0 0 0-177.76875 177.7921875V754.953125c0 13.1034375 10.60875 23.7121875 23.713125 23.7121875h349.63125a159.984375 159.984375 0 0 0 159.984375-159.984375V482.36a23.7121875 23.7121875 0 0 0-23.7121875-23.6878125z"
                                fill="#515151"
                                p-id="2522"
                            ></path>
                        </svg>
                    </div>
                    <span class="app-name">Gitee</span>
                </a>
                <a class="third-app" href="#" title="使用 GitHub 账号授权登录" @click="authUrl('github')">
                    <div class="git-other-login-icon">
                        <svg
                            t="1581238998885"
                            class="icon"
                            viewBox="0 0 1024 1024"
                            version="1.1"
                            xmlns="http://www.w3.org/2000/svg"
                            p-id="4187"
                            xmlns:xlink="http://www.w3.org/1999/xlink"
                            width="200"
                            height="200"
                        >
                            <path
                                d="M511.542857 14.057143C228.914286 13.942857 0 242.742857 0 525.142857 0 748.457143 143.2 938.285714 342.628571 1008c26.857143 6.742857 22.742857-12.342857 22.742858-25.371429v-88.571428c-155.085714 18.171429-161.371429-84.457143-171.771429-101.6C172.571429 756.571429 122.857143 747.428571 137.714286 730.285714c35.314286-18.171429 71.314286 4.571429 113.028571 66.171429 30.171429 44.685714 89.028571 37.142857 118.857143 29.714286 6.514286-26.857143 20.457143-50.857143 39.657143-69.485715-160.685714-28.8-227.657143-126.857143-227.657143-243.428571 0-56.571429 18.628571-108.571429 55.2-150.514286-23.314286-69.142857 2.171429-128.342857 5.6-137.142857 66.4-5.942857 135.428571 47.542857 140.8 51.771429 37.714286-10.171429 80.8-15.542857 129.028571-15.542858 48.457143 0 91.657143 5.6 129.714286 15.885715 12.914286-9.828571 76.914286-55.771429 138.628572-50.171429 3.314286 8.8 28.228571 66.628571 6.285714 134.857143 37.028571 42.057143 55.885714 94.514286 55.885714 151.2 0 116.8-67.428571 214.971429-228.571428 243.314286a145.714286 145.714286 0 0 1 43.542857 104v128.571428c0.914286 10.285714 0 20.457143 17.142857 20.457143 202.4-68.228571 348.114286-259.428571 348.114286-484.685714 0-282.514286-229.028571-511.2-511.428572-511.2z"
                                p-id="4188"
                            ></path>
                        </svg>
                    </div>
                    <span class="app-name">Github</span>
                </a>
            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
import { systemUserService } from '@great/services';
import useUserStore from '@/store/user';

const { proxy } = getCurrentInstance() as any;

const auths = ref();

const unlockAuth = (row: any) => {
    ElMessageBox.confirm('您确定要解除"' + row.source + '"的账号绑定吗？')
        .then(() => {
            return systemUserService.authUnlock(row.id);
        })
        .then((res: any) => {
            if (res.code === 200) {
                proxy?.$modal.msgSuccess('解绑成功');
                init();
            } else {
                proxy?.$modal.msgError(res.msg);
            }
        })
        .catch(() => {});
};

const authUrl = (source: string) => {
    systemUserService.authBinding(source, useUserStore().tenantId).then((res: any) => {
        if (res.code === 200) {
            window.location.href = res.data;
        } else {
            proxy?.$modal.msgError(res.msg);
        }
    });
};
const getAuths = async () => {
    const res = await systemUserService.getAuthList();
    auths.value = res.data;
};
const init = () => {
    getAuths();
};
init();
</script>

<style lang="scss" scoped>
.user-bind .third-app {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    min-width: 80px;
    float: left;
}

.user-bind {
    font-size: 1rem;
    text-align: start;
    height: 50px;
    margin-top: 10px;
}

.git-other-login-icon > svg {
    height: 32px;
    width: 32px;
}

a {
    text-decoration: none;
    cursor: pointer;
    color: #005980;
}

.provider-desc {
    font-family:
        -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji',
        'Segoe UI Symbol', 'Liberation Sans', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB',
        'Wenquanyi Micro Hei', 'WenQuanYi Zen Hei', 'ST Heiti', SimHei, SimSun, 'WenQuanYi Zen Hei Sharp', sans-serif;
    font-size: 1.071rem;
}

td > img {
    height: 20px;
    width: 20px;
    display: inline-block;
    border-radius: 50%;
    margin-right: 5px;
}
:deep(.el-table) {
    .el-table__header {
        width: 100% !important;
    }
}
</style>
